//
//  Assignment2A.m
//  Assignment2A
//
//  Created by George Tso on 10/17/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PolygonShape.h"

int	PrintPolygonInfo() {
	NSMutableArray *array = [[NSMutableArray alloc] init];
	
	PolygonShape *sides4 = [[PolygonShape alloc] initWithNumberOfSides:4 minimumNumberOfSides:3 maximumNumberOfSides:7];
	[array addObject:sides4];
	[sides4 description];
	[sides4 release];
	
	PolygonShape *sides6 = [[PolygonShape alloc] initWithNumberOfSides:6 minimumNumberOfSides:5 maximumNumberOfSides:9];
	[array addObject:sides6];
	[sides6 description];
	[sides6 release];

	PolygonShape *sides12 = [[PolygonShape alloc] initWithNumberOfSides:12 minimumNumberOfSides:9 maximumNumberOfSides:12];
	[array addObject:sides12];
	[sides12 description];
	[sides12 release];
	
	//Job4 test constraints
	for (int i=0; i<[array count]; i++) {
		PolygonShape *test = [array objectAtIndex:i];
		[test setNumberOfSIdes:10];
		[test release];
	}
	
	return 0;
}

int main (int argc, const char *argv[]) {
	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
	
	PrintPolygonInfo(); // Section 6
	
	[pool release];
	return 0;
}